<html>
<head><meta charset="utf-8"><title>Can I deny warnings that aren&#x27;t lints? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Can.20I.20deny.20warnings.20that.20aren&#x27;t.20lints.3F.html">Can I deny warnings that aren&#x27;t lints?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227860137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Can%20I%20deny%20warnings%20that%20aren%27t%20lints%3F/near/227860137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Can.20I.20deny.20warnings.20that.20aren&#x27;t.20lints.3F.html#227860137">(Feb 25 2021 at 23:56)</a>:</h4>
<p>I just added an unconditional warning (not a lint) that's buggy and I want to get a traceback of where it's being emitted. I tried <code>-D warnings -Z treat-err-as-bug</code> but that doesn't seem to turn the warning into an error. Is there a way to do this?</p>



<a name="227861032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Can%20I%20deny%20warnings%20that%20aren%27t%20lints%3F/near/227861032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Can.20I.20deny.20warnings.20that.20aren&#x27;t.20lints.3F.html#227861032">(Feb 26 2021 at 00:05)</a>:</h4>
<p>oh I guess I can just change it from <code>span_warn</code> to <code>span_err</code> in the source haha</p>



<a name="227862525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Can%20I%20deny%20warnings%20that%20aren%27t%20lints%3F/near/227862525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Can.20I.20deny.20warnings.20that.20aren&#x27;t.20lints.3F.html#227862525">(Feb 26 2021 at 00:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/Can.20I.20deny.20warnings.20that.20aren't.20lints.3F/near/227860137">said</a>:</p>
<blockquote>
<p>I just added an unconditional warning (not a lint) that's buggy and I want to get a traceback of where it's being emitted. I tried <code>-D warnings -Z treat-err-as-bug</code> but that doesn't seem to turn the warning into an error. Is there a way to do this?</p>
</blockquote>
<p>IIUC, the point of a lint is that its level can be changed by the user, whereas an unconditional warning is hardcoded to be a warning.</p>



<a name="227867956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Can%20I%20deny%20warnings%20that%20aren%27t%20lints%3F/near/227867956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Can.20I.20deny.20warnings.20that.20aren&#x27;t.20lints.3F.html#227867956">(Feb 26 2021 at 01:23)</a>:</h4>
<p>anyway, figured out the issue: <a href="https://github.com/rust-lang/rust/pull/82539">https://github.com/rust-lang/rust/pull/82539</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>